//package com.xiguaji.tiktok.task.awemecomment;
//
//import com.xiguaji.tiktok.task.awemecomment.spider.model.Comment;
//import lombok.Data;
//import org.mapstruct.Mapper;
//import org.mapstruct.Mapping;
//
//import java.util.List;
//
//@Data
//public class AwemeComment {
//    private long cid;
//    private String text;
//    private long createTime;
//    private int diggCount;
//    private long uid;
//    private String uniqueId;
//    private String cover;
//    private String avatarMedium;
//
//    @Mapper(componentModel = "spring")
//    public interface AwemeCommentMapper {
//        @Mapping(target = "createTime", source = "create_time")
//        @Mapping(target = "diggCount", source = "digg_count")
//        @Mapping(target = "uid", source = "user.uid")
//        @Mapping(target = "uniqueId", source = "user.unique_id")
//        @Mapping(target = "cover", expression = "java(dto.getUser().getCover_url().get(0).getUrl_list().get(0))")
//        @Mapping(target = "avatarMedium", expression = "java(dto.getUser().getAvatar_medium().getUrl_list().get(0))")
//        AwemeComment mapper(Comment dto);
//
//        List<AwemeComment> mapper(List<Comment> dto);
//    }
//}
